xiao sheng wen <atzlinux@sina.com>,
Boyuan Yang <byang@debian.org>,
Build-Depends:
+ chrpath,
cmake,
darts,
debhelper-compat (= 13),
+ dh-python,
doxygen <!nodoc>,
googletest <!nocheck>,
libmarisa-dev,
opencc <cross>,
dh-sequence-pkgkde-symbolshelper,
pybind11-dev,
- python3:any,
+ python3-dev,
rapidjson-dev,
+ python3-setuptools,
+ python3-wheel,
Standards-Version: 4.6.2
Rules-Requires-Root: no
Section: libs
simplified Chinese.
.
This package includes the conversion tool.
+
+Package: python3-opencc
+Section: python
+Architecture: any
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+ ${shlibs:Depends},
+Description: simplified-traditional Chinese conversion library - Python 3.x
+ opencc is a library for converting character between traditional Chinese and
+ simplified Chinese.
+ .
+ This package provides the Python 3.x module.
# Disable parallel build to circumvent some random build error
# (needs further investigation)
%:
- dh $@ --buildsystem=cmake --no-parallel
+ dh $@ --with python3 --buildsystem=cmake --no-parallel
BUILD_OPTIONS = \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
-DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_PYTHON=ON \
-DUSE_SYSTEM_DARTS=ON \
-DUSE_SYSTEM_GTEST=ON \
-DUSE_SYSTEM_MARISA=ON \
override_dh_auto_configure:
dh_auto_configure -- $(BUILD_OPTIONS)
+execute_after_dh_auto_build:
+ dh_auto_build -O--buildsystem=pybuild -- -s distutils --after-build \
+ "cp obj-$(DEB_BUILD_GNU_TYPE)/opencc_clib.*.so {build_dir}/opencc/clib/"
+
+execute_after_dh_auto_test:
+ dh_auto_test -O--buildsystem=pybuild -- -s distutils
+
+execute_after_dh_auto_install:
+ dh_auto_install -O--buildsystem=pybuild -- -s distutils
+ chrpath --delete debian/tmp/usr/lib/*/dist-packages/opencc/clib/*.so
+ for i in debian/tmp/usr/lib/*/dist-packages/opencc/clib/; do \
+ mkdir -p $$i/share/; \
+ ln -sf ../../../../../../share/opencc $$i/share/; \
+ done
+
execute_after_dh_auto_clean:
find . -name *.pyc -delete